package clues.bihu.cluesaccident

import android.app.Activity
import android.content.Intent
import android.os.Bundle

class IntentPlatformActivity : Activity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        getJpushData()
    }


    private fun getJpushData() {
        if (intent.extras != null) {
            val mClueId = intent.extras.getString("ClueId")
            val mMessageType = intent.extras.getInt("MessageType")
            if (mClueId != "") {
                val bundle = Bundle()
                bundle.putString("ClueId", mClueId)
                bundle.putInt("MessageType", mMessageType)
                val intent = Intent(this, HomeActivity::class.java)
                intent.putExtras(bundle)
                startActivity(intent)
                finish()
            } else {
                finish()
            }
        } else {
            finish()
        }
    }

}